<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>专家信息补充</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>
    <link th:href="@{/css/index.css}" rel="stylesheet"/>
    <link th:href="@{/css/tool.css}" rel="stylesheet"/>
    <!-- 图标  -->
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1531710_xb357ub1wmg.css"/>
    <script th:src="@{/layui/layui.js}" type="text/javascript"></script>
    <script th:src="@{/js/marked.min.js}" type="text/javascript"></script>
</head>
<body>
<div th:insert="~{navigation::nav}"></div>
<div class="layui-fluid main">
    <div class="layui-row layui-col-space10">
        <div class="layui-col-lg9">
            <h1>专家信息补充</h1>
            <hr>
            <form class="layui-form" action="/expert/add" method="post">
                <input type="hidden" name="id" th:value="${expert.id}">
                <input type="hidden" name="shFileId" id="shFileId">
                <div class="layui-form-item marginTop15px">
                    <label class="layui-form-label">专家资格文件上传</label>
                    <div class="layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="fileChoose">选择文件</button>
                        <button type="button" class="layui-btn" id="fileUpload">开始上传</button>
                    </div>
                </div>

                <div class="layui-form-item" style="width: 235px;">
                    <label class="layui-form-label">评标方向</label>
                    <div class="layui-input-block">
                        <select name="type" lay-filter="aihao">
                            <option value="" selected=""></option>
                            <option value="0">方向1</option>
                            <option value="1">方向2</option>
                            <option value="2">方向3</option>
                            <option value="3">方向4</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item marginTop15px">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit>立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>

        <div class="layui-col-lg3">
            <h1>注意</h1>
            <hr>
            <h3>1.选择专家的评选的方向</h3>
            <h3>2.上传证明你在该方向的相关资格证书</h3>

        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    layui.use(['form', 'laydate', 'upload', 'element', 'jquery'], function () {
        var form = layui.form
            , laydate = layui.laydate
            , upload = layui.upload
            , $ = layui.jquery;

        //选完文件后不自动上传
        upload.render({
            elem: '#fileChoose'
            , url: '/file/upload/3' //招标上传接口
            , auto: false
            , accept: 'file'
            //,multiple: true
            , bindAction: '#fileUpload'
            , done: function (res) {
                if (res.code == 200) {
                    layer.msg('上传成功');
                    $('#shFileId').val(res.fileId);
                }
                console.log(res)
            }
        });

    });
</script>
</html>